// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	9/19/2014 2:44:39 PM				
// -----------------------------

#ifndef _Scene_h
#define _Scene_h

#include "Common.h"

class Application;

class Actor;
class Camera;

class Scene
{
public:

	Scene(const TString& lpName);
	virtual ~Scene();

	virtual void		OnActivate(Application* lpApp);
	virtual void		OnDeactivate(Application* lpApp);
	virtual void		OnGUI(Application* lpApp, IRenderTarget2D* lpTarget);

	virtual void		Load(Application* lpApp);
	virtual void		Update(Application* lpApp, Float deltaTime);

	void				AddActor(Actor* lpActor);
	void				RemoveActor(Actor* lpActor, Bool bDelete = false);

	void				SetCamera(Camera* lpCamera, Bool bRemoveFromScene = false, Bool bDelete = false);

	const TString&		GetName() const;
	Camera*				GetCamera() const;

	Actor*				FindActor(const TString& Name) const;
	Bool				ContainsActor(Actor* lpActor) const;
	vector<Actor*>		GetActorsWithFlags(UInt32 uFlags) const;
	template<typename T>
	vector<T*>			GetActorsWithFlagsAs(UInt32 uFlags) const;

private:

	TString				m_Name;
	Camera*				m_lpCamera;
	vector<Actor*>		m_Actors;

	Scene(const Scene& refScene);
	Scene& operator=(const Scene& refScene);
};

#include "Scene.inl"
#endif